import React, { FC, ReactElement, useState } from 'react'
import { ITransitTime } from '../../types/ITransitTime';
import TransitTimeInfo from '../../types/TransitTimeInfo';
import AddBar from './AddBar'
import ItemList from './ItemList'

const TransitTime:FC<ITransitTime> = ({
    transitTimes,
    addTransitTime,
    removeTransitTime
}):ReactElement=>{

    // const [transitTime,setTransitTime] = useState<TransitTimeInfo[]>([]);

    return <>
    <AddBar addTransitTime={addTransitTime} ></AddBar>
    <ItemList transitTimes={transitTimes}  removeTransitTime={removeTransitTime}></ItemList>
    </>;
}

export default TransitTime;